import request from '@/utils/request'

// 查询bannan列表
export function listBanner(query) {
  return request({
    url: '/application/banner/list',
    method: 'get',
    params: query
  })
}

// 查询bannan详细
export function getBanner(id) {
  return request({
    url: '/application/banner/' + id,
    method: 'get'
  })
}

// 新增bannan
export function addBanner(data) {
  return request({
    url: '/application/banner',
    method: 'post',
    data: data
  })
}

// 修改bannan
export function updateBanner(data) {
  return request({
    url: '/application/banner',
    method: 'put',
    data: data
  })
}

// 删除bannan
export function delBanner(id) {
  return request({
    url: '/application/banner/' + id,
    method: 'delete'
  })
}

// 导出bannan
export function exportBanner(query) {
  return request({
    url: '/application/banner/export',
    method: 'get',
    params: query
  })
}
// 基础数据
export function sortList() {
  return request({
    url: '/application/sort/sortList',
    method: 'get'
  })
}

export function file_upload(data) {
  return request({
    url: "/application/banner/imageUpload",
    method: 'post',
    data: data
  })
}
